Skip to content

Instantly share code, notes, and snippets.

@vitorcostacc
vitorcostacc / ClassVsStruct.md
Last active September 27, 2026 21:42
Differences and similarities between Class and Struct in Swift

Based on SwiftDocs

Let's do this in a practical way...

1. Properties:

Classes and Structures both can store properties:

Properties

As you can see in the image, there's one first difference: a class need an explicit init method. So, we have to do this:

@jph00
jph00 / smol-training.md
Created October 31, 2025 07:29
smol training playbook

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@bradtraversy
bradtraversy / terminal-commands.md
Last active September 27, 2026 21:32
Common Terminal Commands

Common Terminal Commands

Key Commands & Navigation

Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:

  • Up Arrow: Will show your last command
  • Down Arrow: Will show your next command
  • Tab: Will auto-complete your command
  • Ctrl + L: Will clear the screen
@jmatsushita
jmatsushita / README
Last active September 27, 2026 21:28
Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro
###
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places.
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of
###. things to watch out for:
### - Check out the `nix-darwin` instructions, as they have changed.
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026
###
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs).
# So here's a minimal Gist which worked for me as an install on a new M1 Pro.
@iamwildtuna
iamwildtuna / gist:7772b7c84a11bf6e1385f23096a73a15
Last active September 27, 2026 21:12
VPN IP Addresses (IP адреса ChatGPT, Copilot, Meta, Facebook, Instagram, YouTube, Medium, X ex. Twitter, Discord)
Meta (Instagram, Facebook)
// Узлы
157.240.253.174, 157.240.253.172, 157.240.253.167, 157.240.253.63, 157.240.253.32
157.240.252.174, 157.240.252.172, 157.240.252.167, 157.240.252.63, 157.240.252.38
57.144.112.34, 57.144.110.1, 157.240.205.174, 87.245.223.97
// Подсети
213.102.128.0/24
204.15.20.0/22
199.201.0.0/16
@strouptl
strouptl / gist:c1ba4df03a3c2ed76920d5c2a2986589
Last active September 27, 2026 21:10
Simple Devs Manifesto

The Simple Devs Manifesto

We hold that the highest and the most essential test of code quality is simplicity. Simple code is good code, and the simplest solution is the best solution.

In a word:

Simplicity == Quality

Seed Cracking

Part 1: A little explanation about Java Random

  • java.util.Random, An instance of this class is used to generate a stream of pseudorandom numbers. The class uses a 48-bit seed, which is modified using a linear congruential formula. (See Donald Knuth, The Art of Computer Programming, Volume 2, Section 3.2.1.)

  • This class has 6 nifty functions:

    • nextBoolean()
    • nextDouble()
  • nextFloat()